package com.ruoyi.project.visit.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;
import java.util.Objects;

/**
 * 病例实体类型
 */
public class DoctorPatientHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Integer historyId;
    /** 病例编号 */
    private String historyNumber;
    /** 接诊类型 0-初诊； 1-复诊 */
    private String historyType;
    /** 病人描述 */
    private String historyDiscribe;
    /** 发病时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date historyDate;
    /** 诊断信息 */
    private String historyDiagnosis;
    /** 是否传染 0 - 否； 1 - 是 */
    private String historyContagion;
    /** 医生建议 */
    private String historyProposal;
    /** 医生备注 */
    private String historyRemark;
    /** 患者外键 */
    private Integer historyPatientId;

    @Override
    public String toString() {
        return "DoctorPatientHistory{" +
                "historyId=" + historyId +
                ", historyNumber='" + historyNumber + '\'' +
                ", historyType='" + historyType + '\'' +
                ", historyDiscribe='" + historyDiscribe + '\'' +
                ", historyDate=" + historyDate +
                ", historyDiagnosis='" + historyDiagnosis + '\'' +
                ", historyContagion='" + historyContagion + '\'' +
                ", historyProposal='" + historyProposal + '\'' +
                ", historyRemark='" + historyRemark + '\'' +
                ", historyPatientId=" + historyPatientId +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DoctorPatientHistory that = (DoctorPatientHistory) o;
        return Objects.equals(historyId, that.historyId) &&
                Objects.equals(historyNumber, that.historyNumber) &&
                Objects.equals(historyType, that.historyType) &&
                Objects.equals(historyDiscribe, that.historyDiscribe) &&
                Objects.equals(historyDate, that.historyDate) &&
                Objects.equals(historyDiagnosis, that.historyDiagnosis) &&
                Objects.equals(historyContagion, that.historyContagion) &&
                Objects.equals(historyProposal, that.historyProposal) &&
                Objects.equals(historyRemark, that.historyRemark) &&
                Objects.equals(historyPatientId, that.historyPatientId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(historyId, historyNumber, historyType, historyDiscribe, historyDate, historyDiagnosis, historyContagion, historyProposal, historyRemark, historyPatientId);
    }

    public Integer getHistoryId() {
        return historyId;
    }

    public void setHistoryId(Integer historyId) {
        this.historyId = historyId;
    }

    public String getHistoryNumber() {
        return historyNumber;
    }

    public void setHistoryNumber(String historyNumber) {
        this.historyNumber = historyNumber;
    }

    public String getHistoryType() {
        return historyType;
    }

    public void setHistoryType(String historyType) {
        this.historyType = historyType;
    }

    public String getHistoryDiscribe() {
        return historyDiscribe;
    }

    public void setHistoryDiscribe(String historyDiscribe) {
        this.historyDiscribe = historyDiscribe;
    }

    public Date getHistoryDate() {
        return historyDate;
    }

    public void setHistoryDate(Date historyDate) {
        this.historyDate = historyDate;
    }

    public String getHistoryDiagnosis() {
        return historyDiagnosis;
    }

    public void setHistoryDiagnosis(String historyDiagnosis) {
        this.historyDiagnosis = historyDiagnosis;
    }

    public String getHistoryContagion() {
        return historyContagion;
    }

    public void setHistoryContagion(String historyContagion) {
        this.historyContagion = historyContagion;
    }

    public String getHistoryProposal() {
        return historyProposal;
    }

    public void setHistoryProposal(String historyProposal) {
        this.historyProposal = historyProposal;
    }

    public String getHistoryRemark() {
        return historyRemark;
    }

    public void setHistoryRemark(String historyRemark) {
        this.historyRemark = historyRemark;
    }

    public Integer getHistoryPatientId() {
        return historyPatientId;
    }

    public void setHistoryPatientId(Integer historyPatientId) {
        this.historyPatientId = historyPatientId;
    }
}
